//
//  LSYTopMsgView.h
//  TTClub
//
//  Created by RoyLei on 15/8/5.
//  Copyright (c) 2015年 TTClub. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef void(^TTClubNoParamsBlock)(void);
typedef NS_ENUM(NSUInteger, LSYTopMsgViewStatusBarType){
    
    LSYTopMsgViewStatusBarTypeNomal   = 0,
    LSYTopMsgViewStatusBarTypeWarning = 1
    
};

@interface LSYTopMsgView : UIView
@property (copy  , nonatomic) TTClubNoParamsBlock notificationTappedBlock;
@property (nonatomic, assign ) LSYTopMsgViewStatusBarType   statusBarType;
@property (nonatomic, retain ) UILabel                      *msgLable;

/**
 *  以单例形式显示顶部提示
 *
 *  @param msg           显示文字
 *  @param time          显示时间
 *  @param statusBarType 样式
 */
+ (void)showMassage:(NSString*)msg time:(NSTimeInterval)time state:(LSYTopMsgViewStatusBarType)statusBarType;

/**
 *  关闭当前显示的内容
 *
 *  @param animationed 动画
 */
+ (void)dissmissWithAnimationed:(BOOL)animationed;

#pragma mark - 新的对象会移除

/**
 *  建立新的通告
 *
 *  @param msg                     通告信息
 *  @param time                    显示时间
 *  @param statusBarType           样式
 *  @param notificationTappedBlock 点击回调
 */
+ (LSYTopMsgView *)showMassage:(NSString*)msg
                                            time:(NSTimeInterval)time
                                            state:(LSYTopMsgViewStatusBarType)statusBarType
                                    tappedBlock:(TTClubNoParamsBlock )notificationTappedBlock;


@end
